package odgs.app.notuse;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class ExplorerListController implements MouseListener
{
	private ExplorerListUI ui;
	private ExplorerListModel model;
	
	public ExplorerListController(ExplorerListUI ui)
	{
		this.ui = ui;
		ui.explorerList.addMouseListener(this);
	}

	public void setExplorer(ExplorerListModel model)
	{
		this.model = model;
		ui.explorerList.setModel(model);
	}

	public void mouseClicked(MouseEvent e)
	{
		if(e.getClickCount() >= 2)
		{
			model.select(ui.explorerList.getSelectedValue());
		}
	}

	public void mouseEntered(MouseEvent arg0){}
	public void mouseExited(MouseEvent arg0){}
	public void mousePressed(MouseEvent arg0){}
	public void mouseReleased(MouseEvent arg0){}
}
